package com.yixun.qfbao.constant;

/**
 * 微信相关常量
 * @author guifang.weng
 * @date 2019年4月23日
 */
public class WxConstant {

    public static final String APP_ID = "appid";

    public static final String APP_SECRET = "secret";

    public static final String JS_CODE = "js_code";

    public static final String GRANT_TYPE = "grant_type";

    public static final String AUTHORIZATION_CODE = "authorization_code";

    public static final String GRANT_TYPE_VALUE1 = "client_credential";

    public static final String ACCESS_TOKEN = "access_token";

    public static final boolean AUTH_NO = false;

    public static final boolean AUTH_YES = true;

    /**
     * 获取accessToken http请求方式: GET
     */
    public static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
    /**
     * 发送模板消息 http请求方式: POST
     */
    public static final String SEND_TEMPLATE_MESSAGE_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";

    /**
     * 发送小程序模板消息：
     * https://developers.weixin.qq.com/miniprogram/dev/api/open-api/template-message/sendTemplateMessage.html
     */
    public static final String SEND_WEAPPA_TEMPLATE_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send";

    /**
     * 获取关注用户列表，一次最多10000个。所以count > 10000的时候需要循环
     */
    public static final String GET_USER_LIST = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID";

    /**
     * 获取用户信息
     */
    public static final String GET_USER_INFO = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";
    
    /**
     * 批量获取用户基本信息，一次最多100条
     */
    public static final String BATCH_GET_USER_INFO = "https://api.weixin.qq.com/cgi-bin/user/info/batchget?access_token=ACCESS_TOKEN";
    
    /**
     * 返回国家地区语言版本
     */
    public static final String LANG = "zh_CN";
    
    /**
     * 微信安全模式，加解密key
     */
    public static final String ENCODING_KEY = "ibl0Rqld5a7AGZmvV0i1YpxKqHPJaPAl8sEYFYnB9aT";
    
    /**
     * TOKEN，与微信进行消息交互时配置的TOKEN
     */
    public static final String TOKEN = "channel";
    
    /**
     * 	无限制获取小程序码
     */
    public static final String GET_UNLIMITED = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=ACCESS_TOKEN";
    
    public static class WeappPage{
    	//分销小程序注册页路径
    	public static final String REGESITER_PAGE = "pages/login/register";
    	public static final String PERMISES_STORE = "premise/premiseStore";
    }
}
